<ui:component xmlns="http://www.w3.org/1999/xhtml"  
     xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.prime.com.tr/ui"> 
    
	
<h:form id="form">

<p:panel header="Buscar Propostas" > 
	  
	    <h:panelGrid columns="2" cellpadding="2" >
		 <h:outputText value="Tipo de Proposta: " />  
		 <p:selectOneRadio value="#" >  
            <f:selectItem itemLabel="Proposta de Tema" itemValue="PropostaTema" />  
            <f:selectItem itemLabel="Proposta de TCC" itemValue="PropostaTCC" />  
        </p:selectOneRadio> 
         </h:panelGrid>
         
        <h:panelGrid columns="3" cellpadding="2" >
		<p:selectBooleanCheckbox value="#"/>  
	   		<h:outputText for="titulo" value="Título"/>  
	   		<h:panelGroup>
	   		<p:inputText 
                     	id="titulo" 
                     	required="true" 
                     	label="Título" 
                     	size="40" 
                        value="#" /> 
         	<p:watermark for="titulo" value="Título da Proposta" />  
         	</h:panelGroup>
         	
         <p:selectBooleanCheckbox value="#"/>                 
            <h:outputText for="dataCadastro" value="Cadastrada em"/> 
            <h:panelGroup>
          	<p:calendar id="dataCadastro" 
           				value="#" 
           				mode="popup"  
           				locale="pt_BR"
           				label="Data de Cadastro"
           				autocomplete="true"
           				size="10"
           				effect="drop"
           				pattern="dd/MM/yyyy" 
           				navigator="true"
           				required="true"/>
           		<p:watermark for="dataCadastro" value="__/__/____" /> 	
           		</h:panelGroup>		
           		
           <p:selectBooleanCheckbox value="#"/>                 
            <h:outputText for="dataDefesa" value="Data da Defesa"/> 
            <h:panelGroup>
          	<p:calendar id="dataDefesa" 
           				value="#" 
           				mode="popup"  
           				locale="pt_BR"
           				label="Data da Defesa"
           				autocomplete="true"
           				size="10"
           				effect="drop"
           				pattern="dd/MM/yyyy" 
           				navigator="true"
           				required="true"/>
           		<p:watermark for="dataDefesa" value="__/__/____" /> 	
           		</h:panelGroup>		
           		
          <p:selectBooleanCheckbox value="#"/>  
          <h:outputText for="proponente" value="Proponente"/> 
          <h:panelGroup>
          <p:inputText 
                     	id="proponente" 
                        label="Proponente" 
                     	size="40" 
                        value="#" /> 
          <p:watermark for="proponente" value="Usuário que fez a proposta" />  
          </h:panelGroup>           				                           
          
            <p:selectBooleanCheckbox value="#"/>   
            <h:outputText for="proposto" value="Proposto"/>
            <h:panelGroup>  
         	<p:inputText 
                     	id="proposto" 
                        label="Proposto" 
                     	size="40" 
                        value="#" />         	      			 
           <p:watermark for="proposto" value="Professor indicado para ser orientador"/>  
            </h:panelGroup>  
             <h:outputText/>
             
            <p:commandButton value="Buscar" image="ui-icon ui-icon-search"
                             actionListener="#"/>  
			
			<p:commandButton value="Limpar" image="ui-icon ui-icon-cancel" type="reset"/>  
	
       </h:panelGrid>
	 
    </p:panel>
    
<p:separator/>
<p:growl id="messages"/>  
<p:separator/>

<p:dataTable 
 		id="tccs" 
 		value="#{propostaTemaBean.listarPropostasTemas}" 	
 		var="tcc" 
 		emptyMessage="Não há PROPOSTAS cadastrados" 
 		paginator="true" 
 		rows="10"
        dynamic ="true" 
        selection="#{propostaTemaBean.propostaTemaSelecionada}" 
        selectionMode="single"  
        rowSelectListener="#{propostaTemaBean.onRowSelectNavigate}"  
        dblClickSelect="true"
        >  
  
  		<f:facet name="header">  
                <h:outputText value="Lista de Propostas"/>  
            </f:facet>
       
       
    <p:column headerText="Titulo">  
          <center>
               <h:outputText value="#{tcc.titulo}" filterBy="#{tcc.titulo}" style="width:150px"/>  
          </center>
   </p:column>  

	<p:column headerText="Data Cadastro">  
          <center>
               <h:outputText value="#{tcc.dataCadastro}" filterBy="#{tcc.dataCadastro}" style="width:150px"> 
               			<f:convertDateTime  pattern="dd/MM/yyyy"/>
            	</h:outputText> 
          </center>
   </p:column>  
   
   <p:column headerText="Data Defesa">  
          <center>
               <h:outputText value="#{tcc.dataDefesa}" filterBy="#{tcc.dataDefesa}" style="width:150px"> 
               		<f:convertDateTime  pattern="dd/MM/yyyy"/>
               </h:outputText> 
          </center>
   </p:column>  

  	          
    </p:dataTable>  

  </h:form> 
	
</ui:component>